import React from 'react'
const { $fn, $Lazy } = window
// ===================================================================== Lazy
const Menu = $Lazy.load(()=>import('#frame/menu'))
// ===================================================================== 实验室管理
class Index extends React.Component{
	state = {
		data:[]
	}
	
	skip = { to: 'laboratory-manage/device/device-list' }
	
	child = [
		{ 
			id: 'sbgl', 
			parent: '/laboratory-manage/device/device-list',
			children: [
				{ title: '添加设备', path: 'device-add' },
				{ title: '项目关联', path: 'project-related', 	component:'laboratory-manage/device/project-related' },
				{ title: '校准记录', path: 'calibration-record', component:'laboratory-manage/device/calibration-record' },
				{ title: '设备校准计划', path: 'device-plan', 	component:'laboratory-manage/device/device-plan',
					children:[
						{ title: '校准记录', path: 'calibration-record', component:'laboratory-manage/device/calibration-record' },
					]
				},
				{ title: '设备维护', path: 'device-maintain', component:'laboratory-manage/device/device-maintain' },
			]
		},
		{
			id: 'sbgl', 
			parent: '/laboratory-manage/device/device-plan',
			children: [
				{ title: '校准记录', path: 'calibration-record', component:'laboratory-manage/device/calibration-record' },
			]
		},
		{
			id: 'sbgl', 
			parent: '/laboratory-manage/device/device-maintain',
			children: [
				{ title: '设备维修', path: 'device-repair' },
				{ title: '维修记录', path: 'device-repair-record' },
			]
		},
		// 物料管理
		{
			id: 'material', 
			parent: '/laboratory-manage/supplies/puts-storage',
			children: [
				{ title: '申请单列表', path: 'controlla-domande' },
			]
		},
		// 添加实验号模板
		{
			id: 'syhgl', 
			parent: '/laboratory-manage/experiment-manage/experiment-template',
			children: [
				{ title: '申请单列表', path: 'template-add' },
			]
		},
		// 报告单管理
		{
			id: 'baogao', 
			parent: '/laboratory-manage/device-report/report-sheet',
			children: [
				{ title: '查看报告单', 	path: 'check-report', component:'service-system/report-manage/check-report' },
				// 新增修改基本资料 20200927 耿琰
				{ title: '修改基本资料', 	path: 'change-info', component:'service-system/report-manage/change-info' },
				$fn.menu.preview_report 	// 预览报告单
			]
		},
		{
			id: 'baogao', 
			parent: '/laboratory-manage/device-report/report-template',
			children: [
				{ title: '查看版本', 	path: 'check-version' }
			]
		},
		// 标签管理
		{
			id: 'sysbqmbgl', 
			parent: '/laboratory-manage/label/merged-project-list',
			children: [
				$fn.menu.preview_report 	// 预览报告单
			]
		},
		
	]
	
	componentDidMount(){
		$fn.getMenu.call(this, 'sysgl', this.child)
	}
	
	render(){
		return <Menu data={this.state.data} skip={ this.skip } />
	}
}

export default Index